application of mean value theorem